import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:flame/flame.dart';
import 'package:flutter/services.dart';

void main(List<String> args) {
  runApp(
    MaterialApp(
      home: FlameDemo(),
    ),
  );
  final flameUtil = Flame.device;
  // Flame.device 不支持网页所以要对网页单独判断
  if (!(kIsWeb == true)) {
    flameUtil.fullScreen();
    flameUtil.setOrientation(DeviceOrientation.portraitUp);
  }
}

class FlameDemo extends StatefulWidget {
  const FlameDemo({Key? key}) : super(key: key);

  @override
  State<FlameDemo> createState() => _FlameDemoState();
}

class _FlameDemoState extends State<FlameDemo> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('FlameDemo'),
      ),
      body: Container(),
    );
  }
}
